<html>
	<head>
		{% if title %}
			<title>{{ title }} - Microblog</title>
		{% else %}
			<title>Welcome to Microblog</title>
		{% endif %}
	</head>
	<body>
        <div>
        Microblog:
        <a href="{{ url_for('index') }}">Home</a>
        <!--16.17.5 user login--conditional login and logiout links-->
        {% if current_user.is_anonymous %}
        <a href="{{ url_for('login') }}">Login</a>
        {% else %}
            <a href="{{ url_for('user', username=current_user.username) }}">Profile</a>  <!--1819.1 add a link to the profile page in the navigation bar at the top-->
            <a href="{{ url_for('logout') }}">Logout</a>
        {% endif %}
    </div>
		<div>Microblog:<a href="/index">Home</a></div>
		<hr>
        <hr>
		{% with messages = get_flashed_messages() %}
		{% if messages %}
		<ul>
			{% for message in messages %}
			<li>{{ message }}</li>
			{% endfor %}
		</ul>
		{% endif %}
		{% endwith %}

		{% block content %}
		{% endblock %}
	</body>
</html>